package com.rose.doorto.footbathdoor.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rose.doorto.footbathdoor.mapper.DgtxPlacesMapper;
import com.rose.doorto.footbathdoor.pojo.DgtxPlaces;
import com.rose.doorto.footbathdoor.service.DgtxPlacesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lqc
 * @since 2024-07-12
 */
@Service
public class DgtxPlacesServiceImpl extends ServiceImpl<DgtxPlacesMapper, DgtxPlaces> implements DgtxPlacesService {

    @Autowired
    DgtxPlacesMapper dgtxPlacesMapper;
    /**
     * 获取所有一级分类
     * @return
     */
    @Override
    public List<DgtxPlaces> getParent() {
        return dgtxPlacesMapper.getParent();
    }

    /**
     * 获取二级分类数据
     * @param parentId
     * @return
     */
    @Override
    public List<DgtxPlaces> getSecondaryList(Integer parentId) {
        return dgtxPlacesMapper.getSecondaryList(parentId);
    }

    @Override
    public String getById(Integer id) {
        return dgtxPlacesMapper.getById(id);
    }
}
